import request from "@/utils/request";
import store from "@/store";
export function isTT() {
  return !store.getters.userInfo.tenantId;
}

//查询PTZ位置-租户
export function queryPtzPosition(query) {
  let url = "/video-video/video/query/queryPtzPosition";
  if (isTT) {
    url = "/ttvideo/video/query/queryPtzPositionNew";
  }
  return request({
    url,
    method: "post",
    data: query,
  });
}

//查询转义后PTZ位置-铁塔
export function queryPtzPositionTT(query) {
  return request({
    url: "/ttvideo/video/query/queryPtzPositionNew",
    method: "post",
    data: query,
  });
}

// 根据地块顶点/中心点的经纬度批量计算顶点的百分比坐标和中心点的ptz坐标
export function getPercentPtzByMassPointBatch(query) {
  return request({
    url: "/video-video/video/query/getPercentPtzByMassPointBatch",
    method: "post",
    data: query,
  });
}
// 根据地图顶点经纬度计算屏幕百分比
export function getPercentPtzByMassPointBatchNew(query) {
  return request({
    url: "/video-video/video/query/getPercentPtzByMassPointBatchNew",
    method: "post",
    data: query,
  });
}
